#pragma once

#include "CoreMinimal.h"
#include "GameFramework/GameModeBase.h"
#include "TCP/FTcpExample.h"
#include "UDP/FUdpExample.h"
#include "SimpleNetGameModeBase.generated.h"

UCLASS()
class SIMPLENETCPPDEMO_API ASimpleNetGameModeBase : public AGameModeBase
{
	GENERATED_BODY()

public:
	ASimpleNetGameModeBase();

protected:
	UFUNCTION(Exec)
	static void SendHttpRequest();

	TSharedPtr<FTcpExample> TcpExample;
	UFUNCTION(Exec)
	void ConnectSocket();
	UFUNCTION(Exec)
	void DisconnectSocket();
	UFUNCTION(Exec)
	void SendSocketMsg(const FString& Msg) const;

	TSharedPtr<FUdpExample> UdpExample;
	UFUNCTION(Exec)
	void SendUdpMsg(const FString& Msg) const;
};
